if (do_name() != 'Home') : ?>
Reference | colormode()
endif ?>
Syntax | colormode(mode, range=1.0)
|
Description | Changes the way NodeBox interprets color data. By default, fill() and stroke() are set by values between 0.0 and 1.0 using the RGB color model. RGB corresponds to Red/Green/Blue. Alternatively HSB (Hue/Saturation/Brightness) or CMYK (Cyan/Magenta/Yellow/Black) can be specified. Regardless of which colormode is specified, PDF's and images are exported in the specified outputmode(). The optional range parameter specifies whether color values are defined between 0.0 and 1.0, or something else, 0 and 255 for example (range=255). |
Returns | the current color mode (RGB, CMYK or HSB)
|
Tutorial | Colors
|
|
Example | | colormode(RGB)
fill(0.25, 0.25, 0.25)
rect(10, 10, 40, 40)
colormode(HSB)
fill(0, 0, 0.25)
rect(60, 10, 40, 40) |
|
include("util/comment.php"); ?>